home *** CD-ROM | disk | FTP | other *** search
- /**
- ** Scan the command line for file name arguments and remove duplicates. This
- ** is necessary because PISCES concatentates all SRCS definitions to produce
- ** a list of files at revup time. Since the same file may be used in more than
- ** one program in the Imake file, you can't revup the same file more than
- ** once!
- **/
-
- #ifndef NULL
- #define NULL 0L;
- #endif
-
- int remove_duplicates(argc, argv)
- int argc; char ** argv;
- {
- int i, j;
- register char** p;
- register char** q;
-
- for( i = 0, p = argv; i < argc; p++, i++)
- {
- for( j = i, q = p+1; j < argc-1; q++, j++)
- {
- if( !strcmp (*p, *q) )
- {
- *q = argv[argc-1];
- argv[argc-1] = NULL;
- argc--;
- }
- }
- }
- return argc;
- }
-
-
-